<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>business_add</title>
    <link rel="stylesheet" href="../../../static/layer/css/layui.css" media="all"/>
    <style>
        .view-form .layui-input-block, .view-form .layui-input-inline {
            line-height: 36px;
            background: #eeeeee;
            padding-left: 20px;
            font-size: 16px;
        }
        .message-title{
            text-align: center;
            font-size: 25px;
            font-weight: bolder;
            margin: 10px auto;
        }
        .message-time{
            text-align: center;
            color: #A3A3A3;
            margin: 10px auto;
        }
        .message-content{
            text-indent: 2em;
            font-size: 16px;
            margin: 10px auto;
        }
    </style>
</head>

<body>
<div style="padding: 20px;">
    <form class="layui-form" action="">
        <div class="message-title" id="title"></div>
        <div class="message-time">
            <span id="datetime"></span>
        </div>
        <div class="message-content" id="content"></div>
    </form>
</div>

<script type="text/javascript" src="../../../static/js/common/queryUtils.js"></script>
<script type="text/javascript" src="../../../static/layer/layui.js"></script>
<script>
    layui.use(['jquery', 'form', 'layer'], function () {
        var $ = layui.jquery,
            form = layui.form,
            layer = layui.layer;

        //操作类型：add新增，edit修改，view查看
        var operateType = QueryUtils.GetQueryString("type");
        var id = QueryUtils.GetQueryString("id");
        $.ajax({
            url: "/sysMessage/info",
            data: {MESSAGE_ID: id},
            dataType: "json",
            type: "post",
            async: false,
            success: function (res) {
                if (res.errcode === "0") {
                        console.log(res);
                    $("#title").html(res.data.TITLE);
                    $("#datetime").html(res.data.CREATE_TIME);
                    $("#content").html(res.data.CONTENT);
                } else if (res.errcode === "1") {
                    layer.msg(res.errmsg, function () {
                    });
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.error(XMLHttpRequest.status);
                console.error(XMLHttpRequest.readyState);
                console.error(textStatus);
            }
        });
    });
</script>
</body>

</html>